package com.aiolos.wxdc.service.impl;

import com.aiolos.wxdc.dataobject.SellerInfo;
import com.aiolos.wxdc.repository.SellerInfoRepository;
import com.aiolos.wxdc.service.SellerUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 应该是微信第三方授权，此处通过数据库查找代替
 */
@Service
public class SellerUserServiceImpl implements SellerUserService {

    @Autowired
    private SellerInfoRepository sellerInfoRepository;

    @Override
    public SellerInfo getSellerInfoByOpenId(String openid) {
        return sellerInfoRepository.findByOpenid(openid);
    }
}
